Export to word pecifically

hello,

i would like to export a module doors to word like that :

on doors my objets are like that :

column 1(objet's text) | column 2(objet’s attribute)
________text_1_________|_________textatt_1
________text_2_________|_________textatt_2
________text_3_________|_________textatt_3
________text_4_________|_________textatt_4

and i would like to export like that on word :

__column 1____|___column 2___|___column 3___|___column 4_____
_textatt_1____|____text_1____|______________|________________
______________|______________|____text_2____|____textatt_2___
______________|______________|____text_3____|____textatt_3___
textatt_4_____|____text_4____|______________|________________

(i can't change the module doors) only with DXL script

Thanks for u help
Maxime Reynaud
SystemAdmin - Wed Oct 31 06:49:01 EDT 2012

Re: Export to word pecifically
SystemAdmin - Wed Oct 31 08:41:11 EDT 2012

if u want more information ask me !

Re: Export to word pecifically
llandale - Wed Oct 31 12:15:05 EDT 2012

To use the native Export-to-Word command you first make the module view what you want (optional filtering, specific columns displaying info) and then export. A "Book" export will show each column info listed down, a "Table" export will make a table in Word that looks like your view. At first glance it looks like you want to do a "table" export.

The key is making the view look like what you want.

I think your first example is the information already displayed for a single object; presumably some Layout code. You need to make that look like your 2nd example. If that is all in one column in DOORS (with TABs), I'm guessing if that was the only column showing you could do a "Book" export, and then convert the entire export in Word into a Table.

I'm guessing an AttrDXL may look like this:

Buffer bufResults = create()
 
void    AddRow(string Col1, Col2, Col3, Col4)
{     if (length(bufResults) > 0) then bufResults += "\n"  // EOL of previous line, if any
        bufResults += Col1
        bufResults += "\t"
        bufResults += Col2
        bufResults += "\t"
        bufResults += Col3
        bufResults += "\t"
        bufResults += Col4
}   end AddRow()
 
string  text_1 = whatever(obj),
        text_2 = whatever(obj),
        text_3 = whatever(obj),
        text_4 = whatever(obbj),
        textatt_1 = whatever(obj),
        textatt_2 = whatever(obj),
        textatt_3 = whatever(obj),
        textatt_4 = whatever(obj)
AddRow(textatt_1, text_1, "",     "")
AddRow("",         "",     text_2, textatt2)
AddRow("",         "",     text_3, textatt3)
AddRow(textatt_4, text_4, "",     "")
 
obj.attrDXLName = tempStringOf(bufResults)
delete(bufResults)


-Louie